1. Field of the Invention
The present invention relates to digital image processing and, more particularly, to gamut mapping for color digital images.
2. Description of the Related Art
Modem technology has made it easy to print or display color images. Such images are typically generated by computer, scanned-in or otherwise captured by a digital or video camera. Frequently, however, a reproduced image is not as visually pleasing as one would prefer. One source of disappointment in the reproduced image occurs when the color gamut of the original image contains pixels having a color outside of the gamut which can be produced by the output device.
FIG. 1 is a diagram which schematically illustrates the out-of-gamut problem for an image in CIELAB space. In FIG. 1 it can be seen that image gamut 110 does not coincide with output gamut 120. Simply put, there are colors in input image 110 which cannot be reproduced by the output device because they are not part of output gamut 120. There are many ways to modify an input image so it can be reproduced using a color gamut of a particular output device. Such techniques are well known in the art and are typically called xe2x80x9cgamut mappingxe2x80x9d or xe2x80x9cgamut compressionxe2x80x9d techniques. For simplicity, the term xe2x80x9cgamut mappingxe2x80x9d will be used hereafter as a generic term to describe all of these techniques. It is to be understood, however, that unless otherwise indicated, a reference to gamut mapping techniques shall also encompass gamut compression techniques. A survey of typical gamut mapping techniques can be found in Chapter 2 of the Ph.D. thesis of Jxc3xa1n Moroviĉ, To Develop a Universal Gamut Mapping Algorithm, University of Derby, published October 1998, at pages 7-64 (Condensed format edition).
Briefly stated, the typical conventional way to make a reproduction look the same as the original is to colorimetrically match the colors pixel by pixel. When the reproduction media has a smaller gamut than the original image, matching all pixels is impossible. Yet, all extra-gamut pixels have to be mapped individually back into the color space. Algorithms that do pixel by pixel mapping are forced to choose between two bad alternatives. If they map all extra-gamut pixels to the nearest in-gamut color, then many different colors in the original will be mapped to the same color, thereby losing details in the reproduction and creating visually apparent false details. If instead, they map the extra-gamut colors to a distribution of different colors within the gamut colors, one substantially increases the number of non-matching, desaturated pixels in the image. Both choices yield poor reproductions.
Thus, it can be seen that gamut mapping techniques impose color image reproduction quality limits upon color digital imaging processing devices, and hinder the use of these devices in many applications.
Therefore, there is an unresolved need for a gamut mapping technique that can improve color digital imaging reproduction quality by quickly, accurately and robustly mapping the gamut associated with a color digital image to the gamut of a particular device in a visually pleasing way.
A process and apparatus is described to improve color digital imaging reproduction quality by quickly, accurately and robustly mapping the gamut associated with a color digital image to the gamut of a particular device in a visually pleasing way.
The improvement in appearance of the in-gamut reproduction is based on using calculations similar to those used by the human visual system, namely spatial comparisons. The new approach synthesizes a new reproduction image based on spatial comparisons rather than pixel matches.
For one embodiment, the process begins by describing the color of the original image in Media A in a three-dimensional color space. This is called the GOAL image. Ideally, it is in an isotropic space, such as Lab. Second, we have the reproduction image in a second Media B, but described in the same color space. Because the color gamut of Media B is smaller than that of Media A, this image is the best match possible within the confines of the smaller color gamut. It is calculated, pixel by pixel to find the closest match to the original Media A colors in Media B. This intermediate image is called the BEST image.
The calculation uses the model of human vision. For one embodiment, it begins by converting the (original) Goal and Best Images to their r, g, b (i.e., red, green, blue) color separation channels. Note that alternatively, different channels could be used, such as Yuv, or Lab luminance-chrominance channels. Then it makes spatial comparisons between different areas in the red channel Goal image, Goalr. For example, it may take ratios of intensities at two different locations: x, y and xxe2x80x2, yxe2x80x2. Next it integrates these spatial comparisons across the image. This is accomplished, for example, by multiplying the old value of Bestr (the Best red channel image) at x,y by the ratio (goalr xxxe2x80x2,yxe2x80x2/goalrx,y) to make the new product at xxe2x80x2, yxe2x80x2. The results are then normalized (reset). The results from different spatial integrations are averaged.
These spatial comparisons are made first at large spatial separations (or smallest multi-resolution image) with the output interpolated to make the old for the next smaller spatial-separation image (multi-resolution image). Ratio, product, reset, average, resize calculations are made to calculate old intermediate image at this spatial separation (image size). The process continues until spatial resolution equals 1.0 (full resolution). This old image is the final output separation. One repeats ratio, product, reset, average, resize steps for g and b separations. The r, g, b final separations are then reassembled into the resulting new BOUT image in color.
Alternatively, rather than using multi-scalar images, ratios are calculated from a single resolution image using increasingly smaller distances within the image.
An important aspect of this invention is that instead of calculating the appearance of an image from the radiance found in the scene, it can use both the Goal and the Best images to calculate a resulting new image that has the same spatial comparisons as the original in Media A, within the gamut of Media B. This technique of using a Goal (original) and Best image is also helpful when applied to prior spatial comparison methods for images having a limited dynamic range.
This invention allows the user to calculate new values for all pixels in an image so as to look like another image with completely different colorimetric values.